<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 
        数据类型转换
         */

       // 把Number转换为字符串
        var tmp1 = 100;
        console.log(typeof tmp1) 

        // 转换方式一
        var tmp2 = tmp1.toString();
        console.log(typeof tmp2)

        // 转换方式二
        var tmp3 = String(tmp1);
        console.log(typeof tmp3)

        // 转换方式三
        var tmp4 = tmp1+"";
        console.log(typeof tmp4)
    </script>
</head>
<body>
    
</body>
</html>